﻿@model smsgs_MVC3.Areas.Messages.Models.MessageViewNew

@{
    ViewBag.Title = "Create New Mesage";
}

<h2>Create New Mesage</h2>
@if (Model.HasPreviousMessage)
{
    
   @Html.DisplayFor(m=>m.TheMessage,"IUserMessage");
}


 @using(Html.BeginForm()){
<table>
<tr>
<td>
     <text>To:</text></td>
     <td>
     @Html.EditorFor(m => m.friends, "List_KVP", "NewMessage.ToUser",new {  selectedvalue = (Model.NewMessage.To.Key == Model.User.Key ? "" : Model.NewMessage.To.Key) })
     </td>
</tr>
<tr>
<td>
<text>Subject :</text>
</td>
<td>
@Html.TextBoxFor(m => m.NewMessage.Subject)
</td>
</tr>
<tr>

<td>
<text> Body:</text>
</td><td>
@Html.TextAreaFor(m => m.NewMessage.Body)
</td></tr>
</table>     
<input type="submit" value="Send" />
     
}